<div class="">
<div class="span-2"><?php echo CHtml::encode($model->submitDate);
					?></div>

<div class="span-3"><?php echo CHtml::encode($model->project->name); ?></div>
<div class="span-2">
	<?php echo CHtml::encode($model->getAttributeLabel('approverId')); ?>:
	<?php echo CHtml::encode($model->approver->fullName); ?>
</div>
<div class="span-2">
	<?php echo CHtml::encode($model->getAttributeLabel('warehouseManagerId')); ?>:
	<?php echo CHtml::encode($model->warehouseManager->fullName); ?>
</div>
<div class="span-4">
	<?php echo CHtml::encode($model->getAttributeLabel('token')); ?>:
	<?php echo CHtml::encode($model->token); ?>
</div>
<div class="clear"></div>
<?php if ($model->note) { ?>
<div><?php echo CHtml::encode($model->getAttributeLabel('note')); ?>:
	<?php echo CHtml::encode($model->note); ?></div>
<?php } ?>

</div>
<div class="item-list-grid">
<?php
$this
	->widget('zii.widgets.grid.CGridView',
		array(
			'id' => 'material-requisition-item-grid',
			'dataProvider' => new CArrayDataProvider($model->items,
				array(
					'pagination' => false
				)),
			'template' => "{items}",
			'enablePagination' => false,
			'columns' => array(
				array(
					'class' => 'CCheckBoxColumn',
					'name' => 'id',
					'checkBoxHtmlOptions' => array(
						'name' => 'itemIds[]'
					)
				),
				array(
					'header' => '',
					'type' => 'raw',
					'value' => '$row+1'
				),
				array(
					'header' => '物品',
					'name' => 'materialModelId',
					'type' => 'raw',
					'value' => '$data->materialModel->material->name." ".$data->materialModel->model'
				),
				array(
					'name' => 'brand',
					'header' => '品牌',
				),
				array(
					'name' => 'amount',
					'type' => 'amount',
					'header' => '数量',
				),
				array(
					'name' => 'unit',
					'header' => '单位',
				),
				array(
					'name' => 'amountStandardUnit',
					'type' => 'amount',
					'header' => '折合标准数量',
				),
				array(
					'name' => 'materialModel.unit',
					'header' => '标准单位',
				),
				array(
					'name' => 'applicantId',
					'type' => 'raw',
					'value' => '$data->applicant->fullName',
					'header' => '申购人',
				),
				array(
					'name' => 'note',
					'header' => '备注',
				),
				array(
					'name' => 'lateSubmit',
					'type' => 'boolean',
					'header' => '是否补交',
				),
			),
		));
?>
</div>
